package com.lcifn.middleware.rpc.client.stub;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 请求id自增生成器
 * @author lichao
 * @date 2021/1/31 14:51
 */
public class RequestIdSupport {

    private static AtomicInteger id = new AtomicInteger(1);

    /**
     * 获取下一个id
     * @return
     */
    public static Integer next() {
        return id.getAndIncrement();
    }

}
